Support validating keyless signed images in v-e-c tekton task#3140
Support validating keyless signed images in v-e-c tekton task#3140simonbaird wants to merge 4 commits intoconforma:mainfrom
Conversation
Review Summary by QodoAdd keyless signing verification support to verify-enterprise-contract task
WalkthroughsDescription• Add keyless signing verification support to verify-enterprise-contract task - New CERTIFICATE_IDENTITY and CERTIFICATE_OIDC_ISSUER parameters - Conditional logic to use keyless or public-key verification • Convert task validate step from command to script format - Enables flexible parameter handling for keyless signatures • Create test infrastructure for keyless signed images - Scripts to generate and verify test images with cosign v2 and v3 • Add acceptance tests for keyless signature verification - Tests for both cosign v2 and v3 signature formats Diagramflowchart LR
A["verify-enterprise-contract Task"] -->|"Add Parameters"| B["CERTIFICATE_IDENTITY<br/>CERTIFICATE_OIDC_ISSUER"]
A -->|"Convert to Script"| C["Flexible Parameter<br/>Handling"]
C -->|"Support"| D["Keyless Verification"]
C -->|"Support"| E["Public-Key Verification"]
F["Test Image Creation"] -->|"Generate"| G["Keyless Signed Images<br/>v2 and v3"]
G -->|"Verify in"| H["Acceptance Tests"]
File Changes1. tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml
|
Code Review by Qodo
1. Tekton script param injection
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
3f4a73d to
0a2662b
Compare
|
I added a commit to address Qodo's "action required" about the env vars vs params. The other two suggestions I think I'm okay with leaving as-is. The partial oidc values I want to handle in ec rather than handle in bash. For the "tests use canned image", it's explain in comments, and I'll file a new Jira to track improving this. |
0a2662b to
94691c7
Compare
I'm doing this first in its own separate commit because it will make the next commit easier to understand and review. There's no functional change happening, we're just defining the task step in a different way. Note: - There are some clear inconsistencies in the way we use `--arg=value` or `--arg value` but I'm keeping all that as-is, since I want this change to be as small as possible. - For the same reason I'm keeping the commentary, and the timeout param, which I think could be removed now. Not touching it. - I'm focussing on just the verify-enterprise-contract task only here. My plan is to get that working first, then tackle the other tasks. Ref: https://issues.redhat.com/browse/EC-1652 Co-authored-by: Claude Code <noreply@anthropic.com>
We're keeping the new param handling bash as light as possible. My thinking is that ec should produce a good enough error if the params are wrong or incorrectly specified, so we don't want or need a layer messy bash to check that they are correct. Ref: https://issues.redhat.com/browse/EC-1652 Co-authored-by: Claude Code <noreply@anthropic.com>
94691c7 to
125d6d0
Compare
|
/review |
|
Persistent review updated to latest commit 125d6d0 |
|
I think the acceptance test fail is spurious since it passes locally. |
As per the comments, I'm creating an image that we can use with the acceptance tests. Unlike the "golden-container" it wasn't built in Konflux and hence it doesn't have a realistic Chains style attestation. But it does have a keylessly sig and an a valid attestation. And actually there are two images, one created with cosign v2, and one with cosign v3. This should be useful since we need to support the new sigstore bundle introduced in cosign v3. The verify.sh isn't important for anything, but I want to check it in anyhow, since it serves as a nice instruction on how to verify the keyless signed images and attestations, and it's useful to sanity check the images when/if they need recreating. Ref: https://issues.redhat.com/browse/EC-1652
Note that the snapshot output reveals there are some bugs related to to how we output image signatures and attestation signature for the image with the v3 style sigstore bundle. I want to fix this later since this PR already has a lot of changes, so I filed https://issues.redhat.com/browse/EC-1690 to track it. Ref: https://issues.redhat.com/browse/EC-1652 Co-authored-by: Claude Code <noreply@anthropic.com>
125d6d0 to
63baa34
Compare
|
I'm planning to stop tinkering with this. Hopefully that's the last revision/CI run. |
|
FYI I think the "Tekton script param injection" Qodo complaint is stale. |
|
/retest |
|
/review |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
robnester-rh
left a comment
There was a problem hiding this comment.
LGTM - thanks for doing this.
See commit messages for explanations.
Ref: https://issues.redhat.com/browse/EC-1652